.class Lorg/zeam/LauncherModel$DesktopItemsLoader;
.super Ljava/lang/Object;
.source "LauncherModel.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lorg/zeam/LauncherModel;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "DesktopItemsLoader"
.end annotation


# static fields
.field static final synthetic $assertionsDisabled:Z


# instance fields
.field private volatile mFinished:Z

.field private final mId:I

.field private final mLauncher:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Lorg/zeam/Launcher;",
            ">;"
        }
    .end annotation
.end field

.field private final mLocaleChanged:Z

.field private volatile mStopped:Z

.field final synthetic this$0:Lorg/zeam/LauncherModel;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 237
    const-class v0, Lorg/zeam/LauncherModel;

    invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    sput-boolean v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->$assertionsDisabled:Z

    return-void

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method constructor <init>(Lorg/zeam/LauncherModel;Lorg/zeam/Launcher;Z)V
    .locals 1
    .parameter
    .parameter "launcher"
    .parameter "localeChanged"

    .prologue
    .line 253
    iput-object p1, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    .line 246
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 249
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mLauncher:Ljava/lang/ref/WeakReference;

    .line 250
    invoke-static {}, Lorg/zeam/LauncherModel;->access$0()Ljava/util/concurrent/atomic/AtomicInteger;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I

    move-result v0

    iput v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mId:I

    .line 251
    iput-boolean p3, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mLocaleChanged:Z

    .line 252
    const/4 v0, 0x0

    iput-boolean v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mFinished:Z

    return-void
.end method

.method private loadWorkspace()V
    .locals 51

    .prologue
    .line 272
    sget-object v6, Lorg/zeam/LauncherModel;->LOG_TAG:Ljava/lang/String;

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "  ----> running workspace loader ("

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mId:I

    move v8, v0

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ")"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 273
    const/4 v6, 0x0

    invoke-static {v6}, Landroid/os/Process;->setThreadPriority(I)V

    .line 275
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mLauncher:Ljava/lang/ref/WeakReference;

    move-object v6, v0

    invoke-virtual {v6}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lorg/zeam/Launcher;

    .line 276
    .local v13, launcher:Lorg/zeam/Launcher;
    invoke-virtual {v13}, Lorg/zeam/Launcher;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v5

    .line 277
    .local v5, contentResolver:Landroid/content/ContentResolver;
    invoke-virtual {v13}, Lorg/zeam/Launcher;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v42

    .line 279
    .local v42, manager:Landroid/content/pm/PackageManager;
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mLocaleChanged:Z

    move v6, v0

    if-eqz v6, :cond_0

    .line 280
    move-object/from16 v0, p0

    move-object v1, v5

    move-object/from16 v2, v42

    invoke-direct {v0, v1, v2}, Lorg/zeam/LauncherModel$DesktopItemsLoader;->updateShortcutLabels(Landroid/content/ContentResolver;Landroid/content/pm/PackageManager;)V

    .line 282
    :cond_0
    new-instance v29, Ljava/util/ArrayList;

    invoke-direct/range {v29 .. v29}, Ljava/util/ArrayList;-><init>()V

    .line 283
    .local v29, desktopItems:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ItemInfo;>;"
    new-instance v28, Ljava/util/ArrayList;

    invoke-direct/range {v28 .. v28}, Ljava/util/ArrayList;-><init>()V

    .line 284
    .local v28, desktopAppWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    new-instance v33, Ljava/util/HashMap;

    invoke-direct/range {v33 .. v33}, Ljava/util/HashMap;-><init>()V

    .line 286
    .local v33, folders:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/Long;Lorg/zeam/FolderInfo;>;"
    sget-object v6, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI:Landroid/net/Uri;

    const/4 v7, 0x0

    const/4 v8, 0x0

    const/4 v9, 0x0

    const/4 v10, 0x0

    invoke-virtual/range {v5 .. v10}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 288
    .local v7, cursor:Landroid/database/Cursor;
    :try_start_0
    const-string v6, "_id"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v36

    .line 289
    .local v36, idIndex:I
    const-string v6, "intent"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v39

    .line 290
    .local v39, intentIndex:I
    const-string v6, "title"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v46

    .line 291
    .local v46, titleIndex:I
    const-string v6, "iconType"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v9

    .line 292
    .local v9, iconTypeIndex:I
    const-string v6, "icon"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v12

    .line 293
    .local v12, iconIndex:I
    const-string v6, "iconPackage"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v10

    .line 294
    .local v10, iconPackageIndex:I
    const-string v6, "iconResource"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v11

    .line 295
    .local v11, iconResourceIndex:I
    const-string v6, "container"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v27

    .line 296
    .local v27, containerIndex:I
    const-string v6, "itemType"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v41

    .line 297
    .local v41, itemTypeIndex:I
    const-string v6, "appWidgetId"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v20

    .line 298
    .local v20, appWidgetIdIndex:I
    const-string v6, "screen"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v43

    .line 299
    .local v43, screenIndex:I
    const-string v6, "cellX"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v24

    .line 300
    .local v24, cellXIndex:I
    const-string v6, "cellY"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v25

    .line 301
    .local v25, cellYIndex:I
    const-string v6, "spanX"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v44

    .line 302
    .local v44, spanXIndex:I
    const-string v6, "spanY"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v45

    .line 303
    .local v45, spanYIndex:I
    const-string v6, "uri"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v49

    .line 304
    .local v49, uriIndex:I
    const-string v6, "displayMode"

    invoke-interface {v7, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v30

    .line 315
    .local v30, displayModeIndex:I
    :goto_0
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mStopped:Z

    move v6, v0

    if-nez v6, :cond_1

    invoke-interface {v7}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v6

    if-nez v6, :cond_4

    .line 474
    :cond_1
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 482
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v6, v0

    monitor-enter v6

    .line 484
    :try_start_1
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mStopped:Z

    move v7, v0

    .end local v7           #cursor:Landroid/database/Cursor;
    if-nez v7, :cond_3

    .line 488
    new-instance v47, Ljava/util/ArrayList;

    move-object/from16 v0, v47

    move-object/from16 v1, v29

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    .line 490
    .local v47, uiDesktopItems:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ItemInfo;>;"
    new-instance v48, Ljava/util/ArrayList;

    move-object/from16 v0, v48

    move-object/from16 v1, v28

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    .line 492
    .local v48, uiDesktopWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mStopped:Z

    move v7, v0

    if-nez v7, :cond_2

    .line 493
    sget-object v7, Lorg/zeam/LauncherModel;->LOG_TAG:Ljava/lang/String;

    const-string v8, "  ----> items cloned, ready to refresh UI"

    invoke-static {v7, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 494
    new-instance v7, Lorg/zeam/LauncherModel$DesktopItemsLoader$1;

    move-object v0, v7

    move-object/from16 v1, p0

    move-object v2, v13

    move-object/from16 v3, v47

    move-object/from16 v4, v48

    invoke-direct {v0, v1, v2, v3, v4}, Lorg/zeam/LauncherModel$DesktopItemsLoader$1;-><init>(Lorg/zeam/LauncherModel$DesktopItemsLoader;Lorg/zeam/Launcher;Ljava/util/ArrayList;Ljava/util/ArrayList;)V

    invoke-virtual {v13, v7}, Lorg/zeam/Launcher;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 503
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v7, v0

    move-object v0, v7

    move-object/from16 v1, v29

    invoke-static {v0, v1}, Lorg/zeam/LauncherModel;->access$6(Lorg/zeam/LauncherModel;Ljava/util/ArrayList;)V

    .line 504
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v7, v0

    move-object v0, v7

    move-object/from16 v1, v28

    invoke-static {v0, v1}, Lorg/zeam/LauncherModel;->access$7(Lorg/zeam/LauncherModel;Ljava/util/ArrayList;)V

    .line 505
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v7, v0

    move-object v0, v7

    move-object/from16 v1, v33

    invoke-static {v0, v1}, Lorg/zeam/LauncherModel;->access$8(Lorg/zeam/LauncherModel;Ljava/util/HashMap;)V

    .line 506
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v7, v0

    const/4 v8, 0x1

    invoke-static {v7, v8}, Lorg/zeam/LauncherModel;->access$9(Lorg/zeam/LauncherModel;Z)V

    .line 482
    .end local v47           #uiDesktopItems:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ItemInfo;>;"
    .end local v48           #uiDesktopWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    :cond_3
    monitor-exit v6
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 512
    return-void

    .line 317
    .restart local v7       #cursor:Landroid/database/Cursor;
    :cond_4
    :try_start_2
    move-object v0, v7

    move/from16 v1, v41

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v40

    .line 318
    .local v40, itemType:I
    sparse-switch v40, :sswitch_data_0

    goto/16 :goto_0

    .line 333
    :sswitch_0
    move-object v0, v7

    move/from16 v1, v39

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    move-result-object v38

    .line 335
    .local v38, intentDescription:Ljava/lang/String;
    const/4 v6, 0x0

    :try_start_3
    move-object/from16 v0, v38

    move v1, v6

    invoke-static {v0, v1}, Landroid/content/Intent;->parseUri(Ljava/lang/String;I)Landroid/content/Intent;
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Ljava/net/URISyntaxException; {:try_start_3 .. :try_end_3} :catch_1
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    move-result-object v37

    .line 340
    .local v37, intent:Landroid/content/Intent;
    if-nez v40, :cond_6

    .line 341
    :try_start_4
    move-object/from16 v0, v42

    move-object/from16 v1, v37

    move-object v2, v13

    invoke-static {v0, v1, v2}, Lorg/zeam/LauncherModel;->access$1(Landroid/content/pm/PackageManager;Landroid/content/Intent;Landroid/content/Context;)Lorg/zeam/ApplicationItemInfo;

    move-result-object v22

    .line 346
    .local v22, applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    :goto_1
    if-nez v22, :cond_5

    .line 347
    new-instance v22, Lorg/zeam/ApplicationItemInfo;

    .end local v22           #applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    invoke-direct/range {v22 .. v22}, Lorg/zeam/ApplicationItemInfo;-><init>()V

    .line 348
    .restart local v22       #applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    invoke-virtual/range {v42 .. v42}, Landroid/content/pm/PackageManager;->getDefaultActivityIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v6

    move-object v0, v6

    move-object/from16 v1, v22

    iput-object v0, v1, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 353
    :cond_5
    move-object v0, v7

    move/from16 v1, v46

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    move-object v0, v6

    move-object/from16 v1, v22

    iput-object v0, v1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    .line 354
    move-object/from16 v0, v37

    move-object/from16 v1, v22

    iput-object v0, v1, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    .line 355
    move-object v0, v7

    move/from16 v1, v36

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v14

    move-wide v0, v14

    move-object/from16 v2, v22

    iput-wide v0, v2, Lorg/zeam/ApplicationItemInfo;->id:J

    .line 356
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v26

    .line 357
    .local v26, container:I
    move/from16 v0, v26

    int-to-long v0, v0

    move-wide v14, v0

    move-wide v0, v14

    move-object/from16 v2, v22

    iput-wide v0, v2, Lorg/zeam/ApplicationItemInfo;->container:J

    .line 358
    move-object v0, v7

    move/from16 v1, v43

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v22

    iput v0, v1, Lorg/zeam/ApplicationItemInfo;->screen:I

    .line 359
    move-object v0, v7

    move/from16 v1, v24

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v22

    iput v0, v1, Lorg/zeam/ApplicationItemInfo;->cellX:I

    .line 360
    move-object v0, v7

    move/from16 v1, v25

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v22

    iput v0, v1, Lorg/zeam/ApplicationItemInfo;->cellY:I

    .line 362
    sparse-switch v26, :sswitch_data_1

    .line 368
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v6, v0

    move/from16 v0, v26

    int-to-long v0, v0

    move-wide v14, v0

    move-object v0, v6

    move-object/from16 v1, v33

    move-wide v2, v14

    invoke-static {v0, v1, v2, v3}, Lorg/zeam/LauncherModel;->access$3(Lorg/zeam/LauncherModel;Ljava/util/HashMap;J)Lorg/zeam/UserFolderInfo;

    move-result-object v32

    .line 369
    .local v32, folderInfo:Lorg/zeam/UserFolderInfo;
    move-object/from16 v0, v32

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Lorg/zeam/UserFolderInfo;->add(Lorg/zeam/ApplicationItemInfo;)V
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0

    goto/16 :goto_0

    .line 469
    .end local v22           #applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    .end local v26           #container:I
    .end local v32           #folderInfo:Lorg/zeam/UserFolderInfo;
    .end local v37           #intent:Landroid/content/Intent;
    .end local v38           #intentDescription:Ljava/lang/String;
    .end local v40           #itemType:I
    :catch_0
    move-exception v6

    move-object/from16 v31, v6

    .line 470
    .local v31, e:Ljava/lang/Exception;
    :try_start_5
    sget-object v6, Lorg/zeam/Launcher;->LOG_TAG:Ljava/lang/String;

    const-string v8, "Desktop items loading interrupted:"

    move-object v0, v6

    move-object v1, v8

    move-object/from16 v2, v31

    invoke-static {v0, v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    goto/16 :goto_0

    .line 473
    .end local v9           #iconTypeIndex:I
    .end local v10           #iconPackageIndex:I
    .end local v11           #iconResourceIndex:I
    .end local v12           #iconIndex:I
    .end local v20           #appWidgetIdIndex:I
    .end local v24           #cellXIndex:I
    .end local v25           #cellYIndex:I
    .end local v27           #containerIndex:I
    .end local v30           #displayModeIndex:I
    .end local v31           #e:Ljava/lang/Exception;
    .end local v36           #idIndex:I
    .end local v39           #intentIndex:I
    .end local v41           #itemTypeIndex:I
    .end local v43           #screenIndex:I
    .end local v44           #spanXIndex:I
    .end local v45           #spanYIndex:I
    .end local v46           #titleIndex:I
    .end local v49           #uriIndex:I
    :catchall_0
    move-exception v6

    .line 474
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 475
    throw v6

    .line 321
    .restart local v9       #iconTypeIndex:I
    .restart local v10       #iconPackageIndex:I
    .restart local v11       #iconResourceIndex:I
    .restart local v12       #iconIndex:I
    .restart local v20       #appWidgetIdIndex:I
    .restart local v24       #cellXIndex:I
    .restart local v25       #cellYIndex:I
    .restart local v27       #containerIndex:I
    .restart local v30       #displayModeIndex:I
    .restart local v36       #idIndex:I
    .restart local v39       #intentIndex:I
    .restart local v40       #itemType:I
    .restart local v41       #itemTypeIndex:I
    .restart local v43       #screenIndex:I
    .restart local v44       #spanXIndex:I
    .restart local v45       #spanYIndex:I
    .restart local v46       #titleIndex:I
    .restart local v49       #uriIndex:I
    :sswitch_1
    :try_start_6
    new-instance v23, Lorg/zeam/ApplicationsGridItemInfo;

    move-object/from16 v0, v23

    move-object v1, v13

    invoke-direct {v0, v1}, Lorg/zeam/ApplicationsGridItemInfo;-><init>(Landroid/content/Context;)V

    .line 322
    .local v23, applicationsGridItemInfo:Lorg/zeam/ApplicationsGridItemInfo;
    move-object v0, v7

    move/from16 v1, v36

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v14

    move-wide v0, v14

    move-object/from16 v2, v23

    iput-wide v0, v2, Lorg/zeam/ApplicationsGridItemInfo;->id:J

    .line 323
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    int-to-long v14, v6

    move-wide v0, v14

    move-object/from16 v2, v23

    iput-wide v0, v2, Lorg/zeam/ApplicationsGridItemInfo;->container:J

    .line 324
    move-object v0, v7

    move/from16 v1, v43

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v23

    iput v0, v1, Lorg/zeam/ApplicationsGridItemInfo;->screen:I

    .line 325
    move-object v0, v7

    move/from16 v1, v24

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v23

    iput v0, v1, Lorg/zeam/ApplicationsGridItemInfo;->cellX:I

    .line 326
    move-object v0, v7

    move/from16 v1, v25

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v23

    iput v0, v1, Lorg/zeam/ApplicationsGridItemInfo;->cellY:I

    .line 327
    move-object v0, v7

    move/from16 v1, v44

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v23

    iput v0, v1, Lorg/zeam/ApplicationsGridItemInfo;->spanX:I

    .line 328
    move-object v0, v7

    move/from16 v1, v45

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v23

    iput v0, v1, Lorg/zeam/ApplicationsGridItemInfo;->spanY:I

    .line 329
    move-object/from16 v0, v29

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 336
    .end local v23           #applicationsGridItemInfo:Lorg/zeam/ApplicationsGridItemInfo;
    .restart local v38       #intentDescription:Ljava/lang/String;
    :catch_1
    move-exception v31

    .local v31, e:Ljava/net/URISyntaxException;
    goto/16 :goto_0

    .line 343
    .end local v31           #e:Ljava/net/URISyntaxException;
    .restart local v37       #intent:Landroid/content/Intent;
    :cond_6
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v6, v0

    move-object v8, v13

    invoke-static/range {v6 .. v12}, Lorg/zeam/LauncherModel;->access$2(Lorg/zeam/LauncherModel;Landroid/database/Cursor;Landroid/content/Context;IIII)Lorg/zeam/ApplicationItemInfo;

    move-result-object v22

    .restart local v22       #applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    goto/16 :goto_1

    .line 365
    .restart local v26       #container:I
    :sswitch_2
    move-object/from16 v0, v29

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 376
    .end local v22           #applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    .end local v26           #container:I
    .end local v37           #intent:Landroid/content/Intent;
    .end local v38           #intentDescription:Ljava/lang/String;
    :sswitch_3
    move-object v0, v7

    move/from16 v1, v36

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v34

    .line 377
    .local v34, id:J
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v6, v0

    move-object v0, v6

    move-object/from16 v1, v33

    move-wide/from16 v2, v34

    invoke-static {v0, v1, v2, v3}, Lorg/zeam/LauncherModel;->access$3(Lorg/zeam/LauncherModel;Ljava/util/HashMap;J)Lorg/zeam/UserFolderInfo;

    move-result-object v32

    .line 378
    .restart local v32       #folderInfo:Lorg/zeam/UserFolderInfo;
    move-object v0, v7

    move/from16 v1, v46

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    move-object v0, v6

    move-object/from16 v1, v32

    iput-object v0, v1, Lorg/zeam/UserFolderInfo;->title:Ljava/lang/CharSequence;

    .line 380
    move-wide/from16 v0, v34

    move-object/from16 v2, v32

    iput-wide v0, v2, Lorg/zeam/UserFolderInfo;->id:J

    .line 381
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v26

    .line 382
    .restart local v26       #container:I
    move/from16 v0, v26

    int-to-long v0, v0

    move-wide v14, v0

    move-wide v0, v14

    move-object/from16 v2, v32

    iput-wide v0, v2, Lorg/zeam/UserFolderInfo;->container:J

    .line 383
    move-object v0, v7

    move/from16 v1, v43

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v32

    iput v0, v1, Lorg/zeam/UserFolderInfo;->screen:I

    .line 384
    move-object v0, v7

    move/from16 v1, v24

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v32

    iput v0, v1, Lorg/zeam/UserFolderInfo;->cellX:I

    .line 385
    move-object v0, v7

    move/from16 v1, v25

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v32

    iput v0, v1, Lorg/zeam/UserFolderInfo;->cellY:I

    .line 387
    sparse-switch v26, :sswitch_data_2

    goto/16 :goto_0

    .line 390
    :sswitch_4
    move-object/from16 v0, v29

    move-object/from16 v1, v32

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 396
    .end local v26           #container:I
    .end local v32           #folderInfo:Lorg/zeam/UserFolderInfo;
    .end local v34           #id:J
    :sswitch_5
    move-object v0, v7

    move/from16 v1, v36

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v34

    .line 397
    .restart local v34       #id:J
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->this$0:Lorg/zeam/LauncherModel;

    move-object v6, v0

    move-object v0, v6

    move-object/from16 v1, v33

    move-wide/from16 v2, v34

    invoke-static {v0, v1, v2, v3}, Lorg/zeam/LauncherModel;->access$4(Lorg/zeam/LauncherModel;Ljava/util/HashMap;J)Lorg/zeam/LiveFolderInfo;

    move-result-object v18

    .line 398
    .local v18, liveFolderInfo:Lorg/zeam/LiveFolderInfo;
    move-object v0, v7

    move/from16 v1, v39

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_0

    move-result-object v38

    .line 399
    .restart local v38       #intentDescription:Ljava/lang/String;
    const/16 v37, 0x0

    .line 400
    .restart local v37       #intent:Landroid/content/Intent;
    if-eqz v38, :cond_7

    .line 402
    const/4 v6, 0x0

    :try_start_7
    move-object/from16 v0, v38

    move v1, v6

    invoke-static {v0, v1}, Landroid/content/Intent;->parseUri(Ljava/lang/String;I)Landroid/content/Intent;
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_0
    .catch Ljava/net/URISyntaxException; {:try_start_7 .. :try_end_7} :catch_2
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_0

    move-result-object v37

    .line 408
    :cond_7
    :goto_2
    :try_start_8
    move-object v0, v7

    move/from16 v1, v46

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    move-object v0, v6

    move-object/from16 v1, v18

    iput-object v0, v1, Lorg/zeam/LiveFolderInfo;->title:Ljava/lang/CharSequence;

    .line 409
    move-wide/from16 v0, v34

    move-object/from16 v2, v18

    iput-wide v0, v2, Lorg/zeam/LiveFolderInfo;->id:J

    .line 410
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v26

    .line 411
    .restart local v26       #container:I
    move/from16 v0, v26

    int-to-long v0, v0

    move-wide v14, v0

    move-wide v0, v14

    move-object/from16 v2, v18

    iput-wide v0, v2, Lorg/zeam/LiveFolderInfo;->container:J

    .line 412
    move-object v0, v7

    move/from16 v1, v43

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v18

    iput v0, v1, Lorg/zeam/LiveFolderInfo;->screen:I

    .line 413
    move-object v0, v7

    move/from16 v1, v24

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v18

    iput v0, v1, Lorg/zeam/LiveFolderInfo;->cellX:I

    .line 414
    move-object v0, v7

    move/from16 v1, v25

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v18

    iput v0, v1, Lorg/zeam/LiveFolderInfo;->cellY:I

    .line 415
    move-object v0, v7

    move/from16 v1, v49

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v6

    move-object v0, v6

    move-object/from16 v1, v18

    iput-object v0, v1, Lorg/zeam/LiveFolderInfo;->uri:Landroid/net/Uri;

    .line 416
    move-object/from16 v0, v37

    move-object/from16 v1, v18

    iput-object v0, v1, Lorg/zeam/LiveFolderInfo;->baseIntent:Landroid/content/Intent;

    .line 417
    move-object v0, v7

    move/from16 v1, v30

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v18

    iput v0, v1, Lorg/zeam/LiveFolderInfo;->displayMode:I

    move-object v14, v7

    move v15, v9

    move/from16 v16, v10

    move/from16 v17, v11

    .line 419
    invoke-static/range {v13 .. v18}, Lorg/zeam/LauncherModel;->access$5(Lorg/zeam/Launcher;Landroid/database/Cursor;IIILorg/zeam/LiveFolderInfo;)V

    .line 422
    sparse-switch v26, :sswitch_data_3

    goto/16 :goto_0

    .line 425
    :sswitch_6
    move-object/from16 v0, v29

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 432
    .end local v18           #liveFolderInfo:Lorg/zeam/LiveFolderInfo;
    .end local v26           #container:I
    .end local v34           #id:J
    .end local v37           #intent:Landroid/content/Intent;
    .end local v38           #intentDescription:Ljava/lang/String;
    :sswitch_7
    invoke-static {}, Lorg/zeam/Widget;->makeSearch()Lorg/zeam/Widget;

    move-result-object v50

    .line 433
    .local v50, widgetInfo:Lorg/zeam/Widget;
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v26

    .line 434
    .restart local v26       #container:I
    const/16 v6, -0x64

    move/from16 v0, v26

    move v1, v6

    if-eq v0, v1, :cond_8

    .line 435
    sget-object v6, Lorg/zeam/Launcher;->LOG_TAG:Ljava/lang/String;

    const-string v8, "Widget found where container != CONTAINER_DESKTOP  ignoring!"

    invoke-static {v6, v8}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_0

    .line 438
    :cond_8
    move-object v0, v7

    move/from16 v1, v36

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v14

    move-wide v0, v14

    move-object/from16 v2, v50

    iput-wide v0, v2, Lorg/zeam/Widget;->id:J

    .line 439
    move-object v0, v7

    move/from16 v1, v43

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v50

    iput v0, v1, Lorg/zeam/Widget;->screen:I

    .line 440
    move/from16 v0, v26

    int-to-long v0, v0

    move-wide v14, v0

    move-wide v0, v14

    move-object/from16 v2, v50

    iput-wide v0, v2, Lorg/zeam/Widget;->container:J

    .line 441
    move-object v0, v7

    move/from16 v1, v24

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v50

    iput v0, v1, Lorg/zeam/Widget;->cellX:I

    .line 442
    move-object v0, v7

    move/from16 v1, v25

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v50

    iput v0, v1, Lorg/zeam/Widget;->cellY:I

    .line 443
    move-object v0, v7

    move/from16 v1, v44

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v50

    iput v0, v1, Lorg/zeam/Widget;->spanX:I

    .line 444
    move-object v0, v7

    move/from16 v1, v45

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v50

    iput v0, v1, Lorg/zeam/Widget;->spanY:I

    .line 446
    move-object/from16 v0, v29

    move-object/from16 v1, v50

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 451
    .end local v26           #container:I
    .end local v50           #widgetInfo:Lorg/zeam/Widget;
    :sswitch_8
    move-object v0, v7

    move/from16 v1, v20

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v19

    .line 452
    .local v19, appWidgetId:I
    new-instance v21, Lorg/zeam/LauncherAppWidgetInfo;

    move-object/from16 v0, v21

    move/from16 v1, v19

    invoke-direct {v0, v1}, Lorg/zeam/LauncherAppWidgetInfo;-><init>(I)V

    .line 453
    .local v21, appWidgetInfo:Lorg/zeam/LauncherAppWidgetInfo;
    move-object v0, v7

    move/from16 v1, v36

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v14

    move-wide v0, v14

    move-object/from16 v2, v21

    iput-wide v0, v2, Lorg/zeam/LauncherAppWidgetInfo;->id:J

    .line 454
    move-object v0, v7

    move/from16 v1, v43

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v21

    iput v0, v1, Lorg/zeam/LauncherAppWidgetInfo;->screen:I

    .line 455
    move-object v0, v7

    move/from16 v1, v24

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v21

    iput v0, v1, Lorg/zeam/LauncherAppWidgetInfo;->cellX:I

    .line 456
    move-object v0, v7

    move/from16 v1, v25

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v21

    iput v0, v1, Lorg/zeam/LauncherAppWidgetInfo;->cellY:I

    .line 457
    move-object v0, v7

    move/from16 v1, v44

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v21

    iput v0, v1, Lorg/zeam/LauncherAppWidgetInfo;->spanX:I

    .line 458
    move-object v0, v7

    move/from16 v1, v45

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    move v0, v6

    move-object/from16 v1, v21

    iput v0, v1, Lorg/zeam/LauncherAppWidgetInfo;->spanY:I

    .line 460
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v26

    .line 461
    .restart local v26       #container:I
    const/16 v6, -0x64

    move/from16 v0, v26

    move v1, v6

    if-eq v0, v1, :cond_9

    .line 462
    sget-object v6, Lorg/zeam/Launcher;->LOG_TAG:Ljava/lang/String;

    const-string v8, "Widget found where container != CONTAINER_DESKTOP -- ignoring!"

    invoke-static {v6, v8}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_0

    .line 465
    :cond_9
    move-object v0, v7

    move/from16 v1, v27

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    int-to-long v14, v6

    move-wide v0, v14

    move-object/from16 v2, v21

    iput-wide v0, v2, Lorg/zeam/LauncherAppWidgetInfo;->container:J

    .line 466
    move-object/from16 v0, v28

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_0

    goto/16 :goto_0

    .line 482
    .end local v7           #cursor:Landroid/database/Cursor;
    .end local v19           #appWidgetId:I
    .end local v21           #appWidgetInfo:Lorg/zeam/LauncherAppWidgetInfo;
    .end local v26           #container:I
    .end local v40           #itemType:I
    :catchall_1
    move-exception v7

    :try_start_9
    monitor-exit v6
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_1

    throw v7

    .line 403
    .restart local v7       #cursor:Landroid/database/Cursor;
    .restart local v18       #liveFolderInfo:Lorg/zeam/LiveFolderInfo;
    .restart local v34       #id:J
    .restart local v37       #intent:Landroid/content/Intent;
    .restart local v38       #intentDescription:Ljava/lang/String;
    .restart local v40       #itemType:I
    :catch_2
    move-exception v6

    goto/16 :goto_2

    .line 318
    nop

    :sswitch_data_0
    .sparse-switch
        0x0 -> :sswitch_0
        0x1 -> :sswitch_0
        0x2 -> :sswitch_3
        0x3 -> :sswitch_5
        0x4 -> :sswitch_8
        0x6 -> :sswitch_1
        0x3e9 -> :sswitch_7
    .end sparse-switch

    .line 362
    :sswitch_data_1
    .sparse-switch
        -0xc8 -> :sswitch_2
        -0x64 -> :sswitch_2
    .end sparse-switch

    .line 387
    :sswitch_data_2
    .sparse-switch
        -0xc8 -> :sswitch_4
        -0x64 -> :sswitch_4
    .end sparse-switch

    .line 422
    :sswitch_data_3
    .sparse-switch
        -0xc8 -> :sswitch_6
        -0x64 -> :sswitch_6
    .end sparse-switch
.end method

.method private updateShortcutLabels(Landroid/content/ContentResolver;Landroid/content/pm/PackageManager;)V
    .locals 23
    .parameter "resolver"
    .parameter "manager"

    .prologue
    .line 516
    sget-object v6, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI:Landroid/net/Uri;

    .line 517
    const/4 v5, 0x4

    new-array v7, v5, [Ljava/lang/String;

    const/4 v5, 0x0

    const-string v8, "_id"

    aput-object v8, v7, v5

    const/4 v5, 0x1

    .line 518
    const-string v8, "title"

    aput-object v8, v7, v5

    const/4 v5, 0x2

    .line 519
    const-string v8, "intent"

    aput-object v8, v7, v5

    const/4 v5, 0x3

    .line 520
    const-string v8, "itemType"

    aput-object v8, v7, v5

    .line 521
    const/4 v8, 0x0

    const/4 v9, 0x0

    const/4 v10, 0x0

    move-object/from16 v5, p1

    .line 516
    invoke-virtual/range {v5 .. v10}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v12

    .line 523
    .local v12, cursor:Landroid/database/Cursor;
    const-string v5, "_id"

    invoke-interface {v12, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v13

    .line 524
    .local v13, idIndex:I
    const-string v5, "intent"

    invoke-interface {v12, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v14

    .line 525
    .local v14, intentIndex:I
    const-string v5, "itemType"

    invoke-interface {v12, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v16

    .line 526
    .local v16, itemTypeIndex:I
    const-string v5, "title"

    invoke-interface {v12, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v21

    .line 529
    .local v21, titleIndex:I
    :cond_0
    :goto_0
    :try_start_0
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mStopped:Z

    move v5, v0

    if-nez v5, :cond_1

    invoke-interface {v12}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v5

    if-nez v5, :cond_2

    .line 561
    :cond_1
    invoke-interface {v12}, Landroid/database/Cursor;->close()V

    .line 563
    return-void

    .line 531
    :cond_2
    :try_start_1
    move-object v0, v12

    move/from16 v1, v16

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    if-nez v5, :cond_0

    .line 534
    invoke-interface {v12, v14}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v15

    .line 535
    .local v15, intentUri:Ljava/lang/String;
    if-eqz v15, :cond_0

    .line 536
    const/4 v5, 0x0

    invoke-static {v15, v5}, Landroid/content/Intent;->parseUri(Ljava/lang/String;I)Landroid/content/Intent;

    move-result-object v19

    .line 537
    .local v19, shortcut:Landroid/content/Intent;
    const-string v5, "android.intent.action.MAIN"

    invoke-virtual/range {v19 .. v19}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 538
    invoke-virtual/range {v19 .. v19}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;

    move-result-object v18

    .line 539
    .local v18, name:Landroid/content/ComponentName;
    if-eqz v18, :cond_0

    .line 540
    const/4 v5, 0x0

    move-object/from16 v0, p2

    move-object/from16 v1, v18

    move v2, v5

    invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getActivityInfo(Landroid/content/ComponentName;I)Landroid/content/pm/ActivityInfo;

    move-result-object v11

    .line 541
    .local v11, activityInfo:Landroid/content/pm/ActivityInfo;
    move-object v0, v12

    move/from16 v1, v21

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v20

    .line 542
    .local v20, title:Ljava/lang/String;
    move-object/from16 v0, p2

    move-object v1, v11

    invoke-static {v0, v1}, Lorg/zeam/LauncherModel;->access$10(Landroid/content/pm/PackageManager;Landroid/content/pm/ActivityInfo;)Ljava/lang/String;

    move-result-object v17

    .line 544
    .local v17, label:Ljava/lang/String;
    if-eqz v20, :cond_3

    move-object/from16 v0, v20

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_0

    .line 545
    :cond_3
    new-instance v22, Landroid/content/ContentValues;

    invoke-direct/range {v22 .. v22}, Landroid/content/ContentValues;-><init>()V

    .line 546
    .local v22, values:Landroid/content/ContentValues;
    const-string v5, "title"

    move-object/from16 v0, v22

    move-object v1, v5

    move-object/from16 v2, v17

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 548
    sget-object v5, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI_NO_NOTIFICATION:Landroid/net/Uri;

    .line 549
    const-string v6, "_id=?"

    const/4 v7, 0x1

    new-array v7, v7, [Ljava/lang/String;

    const/4 v8, 0x0

    invoke-interface {v12, v13}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v9

    invoke-static {v9, v10}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v9

    aput-object v9, v7, v8

    .line 548
    move-object/from16 v0, p1

    move-object v1, v5

    move-object/from16 v2, v22

    move-object v3, v6

    move-object v4, v7

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/net/URISyntaxException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_1

    goto/16 :goto_0

    .line 554
    .end local v11           #activityInfo:Landroid/content/pm/ActivityInfo;
    .end local v15           #intentUri:Ljava/lang/String;
    .end local v17           #label:Ljava/lang/String;
    .end local v18           #name:Landroid/content/ComponentName;
    .end local v19           #shortcut:Landroid/content/Intent;
    .end local v20           #title:Ljava/lang/String;
    .end local v22           #values:Landroid/content/ContentValues;
    :catch_0
    move-exception v5

    goto/16 :goto_0

    .line 560
    :catchall_0
    move-exception v5

    .line 561
    invoke-interface {v12}, Landroid/database/Cursor;->close()V

    .line 562
    throw v5

    .line 556
    :catch_1
    move-exception v5

    goto/16 :goto_0
.end method


# virtual methods
.method isRunning()Z
    .locals 1

    .prologue
    .line 261
    iget-boolean v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mFinished:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public run()V
    .locals 1

    .prologue
    .line 265
    sget-boolean v0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->$assertionsDisabled:Z

    if-nez v0, :cond_0

    iget-boolean v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mFinished:Z

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/AssertionError;

    invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V

    throw v0

    .line 266
    :cond_0
    invoke-direct {p0}, Lorg/zeam/LauncherModel$DesktopItemsLoader;->loadWorkspace()V

    .line 267
    const/4 v0, 0x1

    iput-boolean v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mFinished:Z

    .line 268
    return-void
.end method

.method stop()V
    .locals 3

    .prologue
    .line 256
    sget-object v0, Lorg/zeam/LauncherModel;->LOG_TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "  ----> workspace loader "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v2, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mId:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " stopped from "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Thread;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 257
    const/4 v0, 0x1

    iput-boolean v0, p0, Lorg/zeam/LauncherModel$DesktopItemsLoader;->mStopped:Z

    .line 258
    return-void
.end method
